package com.example.lottery.service;

import com.example.lottery.controller.param.DrawPrizeParam;
import com.example.lottery.controller.param.WinningRecordParam;
import com.example.lottery.dao.dataobject.WinningRecordDO;
import com.example.lottery.service.dto.WinningRecordDTO;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface IDrawPrizeService {
    /**
     * 抽奖
     * @param drawPrizeParam 消息体
     */
    void draw(DrawPrizeParam drawPrizeParam);

    /**
     * 校验中奖消息
     * @param drawPrizeParam 中奖消息体
     */
    boolean checkDrawPrizeParam(DrawPrizeParam drawPrizeParam);

    /**
     * 记录中奖信息
     * @param drawPrizeParam
     */
    List<WinningRecordDO> recordWinningInfo(DrawPrizeParam drawPrizeParam);


    /**
     * 回滚中奖信息
     * @param activityId
     * @param prizeId
     */
    void deleteRecords(Long activityId, Long prizeId);

    /**
     * 显示中奖记录，两个维度：奖品/活动
     * @param winningRecordParam
     * @return
     */
    List<WinningRecordDTO> showWinningRecords(WinningRecordParam winningRecordParam);
}
